package com.sanqi.work.service.impl;

import java.util.List;
import com.sanqi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sanqi.work.mapper.WorkUserDateMapper;
import com.sanqi.work.domain.WorkUserDate;
import com.sanqi.work.service.IWorkUserDateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 员工每日工作安排Service业务层处理
 * 
 * @author duany
 * @date 2025-09-24
 */
@Service
public class WorkUserDateServiceImpl extends ServiceImpl<WorkUserDateMapper, WorkUserDate> implements IWorkUserDateService 
{
    @Autowired
    private WorkUserDateMapper workUserDateMapper;

    /**
     * 查询员工每日工作安排
     * 
     * @param id 员工每日工作安排主键
     * @return 员工每日工作安排
     */
    @Override
    public WorkUserDate selectWorkUserDateById(String id)
    {
        return workUserDateMapper.selectWorkUserDateById(id);
    }

    /**
     * 查询员工每日工作安排列表
     * 
     * @param workUserDate 员工每日工作安排
     * @return 员工每日工作安排
     */
    @Override
    public List<WorkUserDate> selectWorkUserDateList(WorkUserDate workUserDate)
    {
        return workUserDateMapper.selectWorkUserDateList(workUserDate);
    }

    /**
     * 新增员工每日工作安排
     * 
     * @param workUserDate 员工每日工作安排
     * @return 结果
     */
    @Override
    public int insertWorkUserDate(WorkUserDate workUserDate)
    {
        workUserDate.setCreateTime(DateUtils.getNowDate());
        return workUserDateMapper.insertWorkUserDate(workUserDate);
    }

    /**
     * 修改员工每日工作安排
     * 
     * @param workUserDate 员工每日工作安排
     * @return 结果
     */
    @Override
    public int updateWorkUserDate(WorkUserDate workUserDate)
    {
        workUserDate.setUpdateTime(DateUtils.getNowDate());
        return workUserDateMapper.updateWorkUserDate(workUserDate);
    }

    /**
     * 批量删除员工每日工作安排
     * 
     * @param ids 需要删除的员工每日工作安排主键
     * @return 结果
     */
    @Override
    public int deleteWorkUserDateByIds(String[] ids)
    {
        return workUserDateMapper.deleteWorkUserDateByIds(ids);
    }

    /**
     * 删除员工每日工作安排信息
     * 
     * @param id 员工每日工作安排主键
     * @return 结果
     */
    @Override
    public int deleteWorkUserDateById(String id)
    {
        return workUserDateMapper.deleteWorkUserDateById(id);
    }
}
